
let loading = null;

axios.interceptors.request.use(config => {
    console.log(config)
    loading =  this.ELEMENT.Loading.service({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
    });
    return config;
},(error) => {
    // 关闭loading
    loading.close();
})

axios.interceptors.response.use(res => {//拦截结果成功
    loading.close();
    return res
},err => {//拦截失败成功
    loading.close();
})


